Skip to content

fix(sdk-coin-ada): align isUnsignedSweep in recoverConsolidations with recover#9118

Draft
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
masterfrom
fix/coins-557-ada-consolidation-isunsignedsweep
Draft

fix(sdk-coin-ada): align isUnsignedSweep in recoverConsolidations with recover#9118
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
masterfrom
fix/coins-557-ada-consolidation-isunsignedsweep

Conversation

@bitgo-ai-agent-dev

Copy link
Copy Markdown

What

  • Fix recoverConsolidations() to use !walletPassphrase as the sole signal for unsigned sweep, matching the logic already in recover()

Why

  • recover() determines isUnsignedSweep using only !params.walletPassphrase, while recoverConsolidations() still used the older !params.userKey && !params.backupKey && !params.walletPassphrase
  • This mismatch meant that providing userKey/backupKey without walletPassphrase caused recover() to return an unsigned MPCSweepTxs, but recoverConsolidations() expected a signed MPCTx, silently mangling the returned object
  • Aligns both functions on the same semantics: absence of walletPassphrase means unsigned sweep

Test plan

  • New test: should treat as unsigned sweep when walletPassphrase is absent even if keys are provided — passes userKey+backupKey without walletPassphrase and asserts the result has txRequests (unsigned shape)
  • All existing sdk-coin-ada unit tests pass (168 passing)

Ticket: COINS-557

…h recover

recoverConsolidations was checking !userKey && !backupKey && !walletPassphrase
to determine whether to treat results as unsigned sweep, while recover() uses
only !walletPassphrase. This mismatch meant that providing userKey/backupKey
without walletPassphrase would cause recoverConsolidations to expect MPCTx but
receive MPCSweepTxs from recover(), silently mangling the return value.

Align recoverConsolidations to use !walletPassphrase exclusively, matching
the semantics established in recover().

Ticket: COINS-557
Session-Id: c754900c-a984-4fd8-baf3-5fca5a865e3b
Task-Id: f9217dca-41de-4d55-a229-617279774136
@linear-code

linear-code Bot commented Jun 25, 2026

Copy link
Copy Markdown

COINS-557

@bitgo-ai-agent-dev bitgo-ai-agent-dev Bot force-pushed the fix/coins-557-ada-consolidation-isunsignedsweep branch from 35cde43 to e6ff565 Compare June 25, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants